<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
require_once('header.php');
include_once '../Lib/pivote.php';
$file=basename(__FILE__, '.php');
ruta($file);

include_once '../Lib/class.setter.php';
include_once '../Lib/class.funcAdministra.php';
include "../../Lib/php/funciones.php";

$avisos= new funcAdministra(Srv,Usr,Pass,base);
$tabla=$avisos->listaAvisos(3);
import_request_variables("gP","v_");
if(!isset($v_Guardar)){
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>SINAVE - Sistema Nacional de Vigilancia Epidemiol&oacute;gica</title>
<link href="main.css" rel="stylesheet" type="text/css" />
<link href="estilos.css" rel="stylesheet" type="text/css" />

<script language="javascript" type="text/javascript" src="js/prototype.js"></script>
<script language="javascript" type="text/javascript" src="js/core.js"></script>
<script language="javascript" type="text/javascript" src="js/validaciones.js"></script>
</head>
<body height="0" width="0" margin="0" top="0" right="0" bottom="0">
    <div id="principal" align="center">
        <table width="780" border="0" cellpadding="0" class="datos2">
            <tr>
              <td width="780" height="107"><img src="images/ssa-banner.jpg" width="780" height="107" /></td>
            </tr>
            <tr>
                <td width="780" height="20">
                    <div id="linkBar" align="left">
                        <table width="100%" >
                              <tr>
                                    <td width="23%">
                                            <strong>Bienvenido(a)</strong>&nbsp;<?php echo $usernomb; ?>
                                    </td>
                                <td width="47%" align="left">
                                            <div id="divLogOut" onclick="javascript: goToUrl('../menu_administrador.php');"><strong>Inicio</strong></div>
                                    </td>
                                    <td id="logInOut" width="30%" align="right">
                                            <div id="divLogOut" onclick="javascript: goToUrl('index.php');">[&nbsp;<strong>Atr&aacute;s</strong>&nbsp;]</div>
                                    </td>
                            </tr>
                      </table>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div id="nuevo">
                        <form name="alta" action="<?php $_SERVER["PHP_SELF"] ?>" method="post">
                            <table border="0" cellpadding="2" cellspacing="2" align="center">
                                <tr>
                                    <td>
                                        Ingresar nuevo Aviso:
                                    </td>
                                    <td>
                                        <textarea cols="60" rows="2" id="nwAviso" name="Nuevo Aviso" onkeydown="javascript: checklength();"></textarea>
                                    </td>
                                    <td>
                                        <input type="submit" name="Guardar" id="Guardar" value="Guardar"/>
                                    </td>
                                </tr>
                            </table>

                        </form>
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <table border="1" cellpadding="1" cellspacing="1">
                        <tr bgcolor="gray" style="color: #fff;">
                            <td>Fecha</td>
                            <td>Contenido</td>
                            <td>Activo</td>
                            <td>Listado</td>
                        </tr>
                        <?php echo $tabla;?>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <div id="generales"></div>
                </td>
            </tr>
            <tr>
              <td width="780" height="64"><img src="images/ssa-footer.jpg" width="780" height="64" /></td>
            </tr>
        </table>
    </div>
</body>
</html>
<?php
}else {
import_request_variables("gP");
//print_r($_POST);
$avisos->guardaAvisos($Nuevo_Aviso, $iduser);
mensaje("El registro se completo satisfactoriamente","m_avisos.php");
}
 ?>
